﻿using GHIElectronics.NETMF.Hardware;

namespace InternetThermostat.DeviceAccessor
{
    public static class TemperatureAccessor
    {
        public static AnalogIn ThermometerPin { get; set; }

        public static double GetTemperatureCelsius()
        {
            return ThermometerPin.Read() / 10.0;
        }

        public static double GetTemperatureFarenheit()
        {
            var c = GetTemperatureCelsius();
            return c * (9.0 / 5) + 32;
        }

    }
}
